<?php namespace App\Http\Controllers\Site;

use App\Http\Controllers\Controller;
use App\Item;
use DB;

class AboutController extends Controller
{
    public function getIndex($type='companyProfile')
    {
        $data= Item::where('type',$type)->get();
        return view('site.About.index',[
            'data'=>$data,
        ]);
    }
    public function getBrand($kind='BrandShow')
    {
        $data= Item::where('kind',$kind)->paginate( config('site.pageSize'));
//        print_r($data);
//        return;

        return view('site.About.brand',[
            'data'=>$data,
            'param'=>['kind'=>$kind]
        ]);
    }
    public  function getTeam($kind='TechnicalTeam')
    {
        $data= Item::where('kind',$kind)->get();
        $data= Item::where('kind',$kind)->paginate( config('site.pageSize'));
        return view('site.About.team',[
            'data'=>$data,
            'param'=>['kind'=>$kind]
        ]);
    }
    public function getStar($kind='StarPhoto')
    {
        $data= Item::where('kind',$kind)->get();
        $data= Item::where('kind',$kind)->paginate( config('site.pageSize'));
        return view('site.About.star',[
            'data'=>$data,
            'param'=>['kind'=>$kind]
        ]);
    }

}